package net.zoneland.knowledge.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Optional;

/**
 * 题库实体.
 * @author hcq
 */
public class QA implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 序号.
     * 这里必须是数字，除非解决排序，有根据num排序的场景
     */
    private Integer num;

    /**
     * 模块.
     */
    private String module;

    /**
     * 题干.
     */
    private String stem;

    /**
     * 模块2用于精确匹配.
     */
    private String module2;
    /**
     * 题干2用于精确匹配.
     */
    private String stem2;

    /**
     * 回答.
     */
    private String answer;

    /**
     * 负责人.
     */
    private String personLiable;

    /**
     * 所属部门.
     */
    private String affiliation;

    /**
     * 问题库.
     */
    private String flag;

    /**
     * 题库状态：0暂存，1正常.
     */
    private int    status;

    /**
     * 责任人账号.
     */
    private String targetId;

    /**
     * 责任人组织Dn.
     */
    private String orgDn;
    /**
     * 备注.
     */
    private String description;
    /**
     * 创建时间.
     */
    private Date createTime;
    /**
     * 更新时间.
     */
    private Date   updateTime;

    /**
     * 用于记录部门题库.
     *  通用题库值 为空，
     */
    private String orgDeptDn;
    /**
     * .
     *
     * @return num
     */
    public Integer getNum() {
        return num;
    }

    /**
     * .
     *
     * @param num to set
     */
    public void setNum(final Integer num) {
        this.num = num;
    }
    /**
     * 获取参数值.
     * @return 参数值
     */
    public String getModule() {
        return module;
    }
    /**
     * 设置 参数.
     * @param module 参数值
     */
    public void setModule(final String module) {
        this.module = module;
    }
    /**
     * 获取参数值.
     * @return 参数值
     */
    public String getStem() {
        return stem;
    }
    /**
     * 设置 参数.
     * @param stem 参数值
     */
    public void setStem(final String stem) {
        this.stem = stem;
    }
    /**
     * 获取参数值.
     * @return 参数值
     */
    public String getAnswer() {
        return answer;
    }
    /**
     * 设置 参数.
     * @param answer 参数值
     */
    public void setAnswer(final String answer) {
        this.answer = answer;
    }
    /**
     * 获取参数值.
     * @return 参数值
     */
    public String getPersonLiable() {
        return personLiable;
    }
    /**
     * 设置 参数.
     * @param personLiable 参数值
     */
    public void setPersonLiable(final String personLiable) {
        this.personLiable = personLiable;
    }
    /**
     * 获取参数值.
     * @return 参数值
     */
    public String getAffiliation() {
        return affiliation;
    }
    /**
     * 设置 参数.
     * @param affiliation 参数值
     */
    public void setAffiliation(final String affiliation) {
        this.affiliation = affiliation;
    }
    /**
     * 获取参数值.
     * @return 参数值
     */
    public String getFlag() {
        return flag;
    }
    /**
     * 设置 参数.
     * @param flag 参数值
     */
    public void setFlag(final String flag) {
        this.flag = flag;
    }

    /**
     * .
     *
     * @return status
     */
    public int getStatus() {
        return status;
    }

    /**
     * .
     *
     * @param status to set
     */
    public void setStatus(final int status) {
        this.status = status;
    }

    /**
     * .
     *
     * @return targetId
     */
    public String getTargetId() {
        return targetId;
    }

    /**
     * .
     *
     * @param targetId to set
     */
    public void setTargetId(final String targetId) {
        this.targetId = targetId;
    }

    /**
     * .
     *
     * @return orgDn
     */
    public String getOrgDn() {
        return orgDn;
    }

    /**
     * .
     *
     * @param orgDn to set
     */
    public void setOrgDn(final String orgDn) {
        this.orgDn = orgDn;
    }

    /**
     * .
     *
     * @return description
     */
    public String getDescription() {
        return description;
    }

    /**
     * .
     *
     * @param description to set
     */
    public void setDescription(final String description) {
        this.description = description;
    }

    /**
     * .
     *
     * @return createTime
     */
    public Date getCreateTime() {
        return Optional.ofNullable(createTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * .
     *
     * @param createTime to set
     */
    public void setCreateTime(final Date createTime) {
        this.createTime = Optional.ofNullable(createTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * .
     *
     * @return updateTime
     */
    public Date getUpdateTime() {
        return Optional.ofNullable(updateTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * .
     *
     * @param updateTime to set
     */
    public void setUpdateTime(final Date updateTime) {
        this.updateTime = Optional.ofNullable(updateTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * .
     *
     * @return module2
     */
    public String getModule2() {
        return module2;
    }

    /**
     * .
     *
     * @param module2 to set
     */
    public void setModule2(final String module2) {
        this.module2 = module2;
    }

    /**
     * .
     *
     * @return stem2
     */
    public String getStem2() {
        return stem2;
    }

    /**
     * .
     *
     * @param stem2 to set
     */
    public void setStem2(final String stem2) {
        this.stem2 = stem2;
    }

    /**
     * .
     *
     * @return serialVersionUID
     */
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    /**
     * .
     *
     * @return orgDeptDn
     */
    public String getOrgDeptDn() {
        return orgDeptDn;
    }

    /**
     * .
     *
     * @param orgDeptDn to set
     */
    public void setOrgDeptDn(final String orgDeptDn) {
        this.orgDeptDn = orgDeptDn;
    }
}
